package com.kgar.service;

import com.kgar.dto.UserDTO;
import com.kgar.entity.pojo.JobInfo;
import com.kgar.entity.pojo.Recruiter;
import com.kgar.entity.pojo.Resume;

import java.util.List;


public interface AsyncService {
    void asyncGetBestJob(UserDTO userDTO) throws InterruptedException;

    //用户和简历和职位之间建立联系
    void createOrUpdateRelationWithResume2Job(UserDTO userDTO, Resume resume, List<JobInfo> jobInfos);
    void createRelationWithUser2Resume(UserDTO userDTO, Resume resume);

    void createUserNode(UserDTO userDTO);

    void createRecruiterNode(Recruiter recruiter);

    void createOrUpdateJobPositionNode(Recruiter one, JobInfo jobInfo);

    void saveOrUpdateJobInfo2Mysql(JobInfo jobInfo);

    void saveOrUpdateJobInfoDoc2ES(JobInfo jobInfo);

    void createOrUpdateRelationWithJob2Resume(UserDTO user, JobInfo info, List<Resume> resumeList);

    void deleteJobFromNeo4j(UserDTO user, Integer jobId);


    void updateJobInfo2AllDataBase(JobInfo jobInfo);

    void saveResume2ES(Resume resume);

    void deleteResumeFromNeo4j(Integer resumeId);

    void deleteResumeFromES(Integer resumeId);

    void addTags2Mysql(UserDTO user, Resume resume);
}
